// function Foo(name) {
//   this.name = name;
// }
// Foo.prototype.age = 18
// Foo.prototype.say = function() {}
// Foo.run = function() {}
// let foo = new Foo('Tom')



// class Foo {
//   constructor(name) {
//     this.name = name
//   }
//   age = 18
//   say() {
//     return 'hello'
//   }
//   static run () {
//     console.log('running');
//   }
// }
// let foo = new Foo('Tom')
// console.log(foo.say());



class Parent {
  constructor(name) {
    this.name = name
  }
}

class Child extends Parent {
  constructor(age, name) {
    super(name)
    this.age = age
  }
}
let c = new Child(20, 'Jerry')

console.log(c.age, c.name);


